package zr.dao;

import java.awt.Color;
import java.net.InetAddress;
import java.net.UnknownHostException;

public class Player {

	String name;
	public Color color;
	public int leftTime;
	public static final int FU1=-100;
	String ip;
	public Player(String userid) {
		this.name=userid;
		this.leftTime=FU1;
		try {
			this.ip= InetAddress.getLocalHost().getHostAddress();
		} catch (UnknownHostException e) {
			e.printStackTrace();
		}
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Color getColor() {
		return color;
	}
	public void setColor(Color color) {
		this.color = color;
	}
	public String getLeftTime() {
		if(FU1==leftTime)
			return "--";
		else 
			return ""+leftTime;
	}
	public void setLeftTime(int leftTime) {
		this.leftTime = leftTime;
	}
	
	public String getIp() {
		return ip;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	public String toString(){
		return name;
	}
	
}
